#!/bin/bash
if [ $# -ne 1 ];then
	echo "请输入至少一个参数"
	exit 1
fi

dist=`curl --connect-timeout 2 -I $1 2>/dev/null |head -1|awk '{print $2}'`
if [ $dist -eq 200 ];then
	echo "Nginx is running"
elif [ $dist -eq 302 ];then
    echo "Nginx is running"
else
	echo "Nginx is flase"
fi
	